package com.vay.de.dang.online.view;

import android.util.SparseArray;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

public class PullRefreshHolder extends RecyclerView.ViewHolder {

    private SparseArray<View> mViews;

    public PullRefreshHolder(View itemView) {
        super(itemView);
        mViews = new SparseArray<>();
    }

    public <V extends View> V findView(int id) {
        View view = mViews.get(id);
        if (view == null) {
            view = itemView.findViewById(id);
            if (view != null) {
                mViews.put(id, view);
            }
        }

        return (V) view;
    }
}